<?php
echo $this -> doctype();
?>
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<?php
		echo $this -> headTitle()."\n";
		echo $this -> headMeta()."\n";
		echo $this -> headLink()."\n";
		echo $this -> headScript()."\n";
		?>
	</head>
	
	<body>
		<div class="wrapper">
			<ul id="topmenu">
				<li class="current"><a href="<?php echo $this -> url(array('controller' => 'index', 'action' => 'index')); ?>">Home</a></li>
				<li><a href="<?php echo $this -> url(array('controller' => 'forum', 'action' => 'index')); ?>">Forum</a></li>
				<li><a href="<?php echo $this -> url(array('controller' => 'wiki', 'action' => 'index')); ?>">Wiki</a></li>
				<li><a href="<?php echo $this -> url(array('controller' => 'downloads', 'action' => 'index')); ?>">Downloads</a></li>
				<li><a href="<?php echo $this -> url(array('controller' => 'links', 'action' => 'index')); ?>">Links</a></li>
			</ul>
			<div id="header">
				<div id="header_center">
					<h1><a href="<?php echo $this -> url(array('controller' => 'index', 'action' => 'index')); ?>">Webmaster City - Grootste webmaster community van Nederland voor PHP, HTML, CSS, Javascript, Flash en Design</a></h1>
					
					<h3>Navigatie</h3>
					<div id="searchbox">
						<form method="post" action="<?php echo $this -> url(array('controller' => 'search', 'action' => 'search')); ?>">
							<fieldset style="border: 0;">
								<input type="text" name="search_query" />
								<input type="submit" class="searchbutton" name="search" value="Zoeken" />
							</fieldset>
						</form>
					</div>
				</div>
				
				<div id="myprofile">
					<h3>Welkom, <?php echo $this -> escape($this -> user -> username); ?></h3>
					
					<?php if(!empty($this -> user -> user_avatar)): ?>
					<img src="<?php echo urlencode($this -> user -> user_avatar); ?>" alt="Avatar" />
					<?php endif; ?>
					
					<ul>
						<?php if($this -> user -> id != -1): ?>
						<li><a href="<?php echo $this -> url(array('controller' => 'user', 'action' => 'index')); ?>">Controle Paneel</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'user', 'action' => 'sessions')); ?>">Mijn Sessies</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'privmsg', 'action' => 'index')); ?>">Inbox (<span id="newmsg_count" style="<?php echo $this -> privmsg['new'] > 0 ? 'color: #B01F17; font-weight: bold;' : ''; ?>"><?php echo $this -> privmsg['new']; ?></span>/<span id="total_msg"><?php echo $this -> privmsg['total']; ?></span>)</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'user', 'action' => 'logout')); ?>">Uitloggen</a></li>
						<?php else: ?>
						<li><a href="<?php echo $this -> url(array('controller' => 'user', 'action' => 'login')); ?>">Inloggen</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'user', 'action' => 'register')); ?>">Registreren</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'user', 'action' => 'newpass')); ?>">Wachtwoord vergeten</a></li>
						<?php endif; ?>
					</ul>
				</div>
				<div class="clear"></div>
			</div>
		</div>
		
		<div id="content">
			<div class="wrapper">
				<div id="menu_left">
					<ul>
						<li><a href="<?php echo $this -> url(array('controller' => 'index', 'action' => 'index')); ?>">Home</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'forum', 'action' => 'index')); ?>">Forum</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'wiki', 'action' => 'index')); ?>">Wiki</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'downloads', 'action' => 'index')); ?>">Downloads</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'links', 'action' => 'index')); ?>">Links</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'user', 'action' => 'memberlist')); ?>">Ledenlijst</a></li>
						<li><a href="<?php echo $this -> url(array('controller' => 'chatbox', 'action' => 'index')); ?>">Chatbox</a></li>
						<?php if(!empty($this -> permissions -> view_admin)): ?>
						<li><a href="{url path='adminindex'}">Administratie</a></li>
						<?php endif; ?>
					</ul>
				</div>
				
				<div id="main_content">
					<?php echo $this -> layout() -> content; ?>				
				</div>
				
				<div id="footer">
					Layout gemaakt door <a href="http://www.ikleef.com">Rein van Oyen</a> -
					&copy; Copyright 2009<?php echo date('Y') != 2009 ? '-'.date('Y') : ''; ?> by Webmaster City.nl
				</div>
			</div>
		</div>
	</body>
</html>
